public class Rectangle {
	private Point p1, p2;
	
	Rectangle(Point p1, Point p2) {
		this.p1 = p1;
		this.p2 = p2;
	}
	
	public Double getArea() {
		double rectangleWidth = p2.x - p1.x;
		double rectangleHeight = p2.y - p1.y;
		
		double rectangleArea = Math.abs(rectangleWidth * rectangleHeight);
		
		return rectangleArea;
	}
	
	public Double getDiagonal() {
		double rectangleWidth = p2.x - p1.x;
		double rectangleHeight = p2.y - p1.y;
		
		double rectangleDiagonal = Math.sqrt(Math.pow(rectangleWidth, 2) + Math.pow(rectangleHeight, 2));

		return rectangleDiagonal;
	}
}